#include<iostream>
#include<cstring>
using namespace std;
int main()
{
	int i,j,a[53];
  	for (int i = 1;i <= 52;i++)
        a[i] = 1;
	for (i=2;i<=51;i++)
	{
		for (j=2;j<=52;j++) 
			if (j % i == 0) a[j] = 1-a[j];
	}
	
	for (int i = 1;i <= 52;i++) 
    {
		if (a[i]==1) cout<<i<<" ";
    }

}

